const getChildrenToStartJSONSchema = (data:any)=>{
    return data.map((item:{
        id:number,
        type:string,
        children:any[]
      })=>({
          name:item.children[0].props.modelValue,
          type:item.children[1].props.modelValue,
          description:item.children[2].props.modelValue,
          isRequired:item.children[3].props.modelValue,
        }))
}

const getChildrenToLLMoutputJSONSchema = (data:any)=>{
  return data.map((item:{
      id:number,
      type:string,
      children:any[]
    })=>({
        name:item.children[0].props.modelValue,
        type:item.children[1].props.modelValue,
        description:item.children[2].props.modelValue,
      }))
}

const getChildrenToLLmJSONSchema = (data:any,ref:string)=>{
  return data.map((item:{
      id:number,
      type:string,
      children:any[],
      ref:string,
    },index:number)=>{
      console.log(ref,'ref')
      return {
        name:item.children[0].props.modelValue,
        value:item.children[2].props.modelValue,
        ref,
        category:item.children[1].props.type,
      }
    })
}
export {
  getChildrenToStartJSONSchema,
  getChildrenToLLmJSONSchema,
  getChildrenToLLMoutputJSONSchema
} 


